// JavaScript Document

$(document).ready(function(){
	
	//新增法规
	$('#ADD_LAW_TOP').click(function(){
		$('#mainFrame',window.parent.document).attr('src','/ag/hmk/LawAdd.jsp');
	});
	
	//加载法规类别
	$.ajax({
  		type: "post",
 		url: "hmk/getWukuType_getWukuType.action",
  		success:function(data){
  			$.each(data.typeList,function(i,n){
  				$("<option value="+n.tpyeId+">"+n.tpyeName+"</option>").appendTo('#lawTypeID');
			});
  		}
	});
	
	//加载法规性质
	$.ajax({
  		type: "post",
 		url: "hmk/getLawNature_findAll.action",
  		success:function(data){
  			$.each(data.lawNatureList,function(i,n){
  				$("<option value="+n.lnId+">"+n.lnName+"</option>").appendTo('#lawNatureID');
			});
  		}
	});
	
	//查询法规
	$('#query_LAW').click(function(){
		$('#mainFrame',window.parent.document).attr('src','/ag/hmk/LawMain.jsp');
	});
	
	
});